package com.lc.user.express.httpserver;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/1.上传头像
 */
@HttpInlet(Net.POST_HEAD)
public class PostHeadPic extends ZJDBAsyPost<Object> {
    public String userid,picurl;

    public PostHeadPic(String userid,String picurl, AsyCallBack listener) {
        super(listener);
        this.userid = userid;
        this.picurl = picurl;
    }

    @Override
    protected Object parser(JSONObject object) {
        if (object.optInt("message") == 1) {
            TOAST = "上传成功";
            return "1";
        } else {
            TOAST = "上传失败";
        }
        return null;
    }
    @Override
    protected boolean skipSecret(String key) {

//        if(key.equals("userid")){
//            return true;
//        }
//        if(key.equals("picurl")){
//            return true;
//        }
//        return false;
        return key.equals("picurl");

    }
}

